home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / Library / Manuels & Misc / Boundschecker / Bounds Checker Standard.TXT < prev    next >
Encoding:
Text File  |  2000-05-25  |  15.0 KB  |  715 lines

  1.  
  2.  
  3. BoundsChecker 5.0
  4.  
  5. Standard Edition 
  6.  
  7.  
  8.  
  9. ReadMe File
  10.  
  11.  
  12.  
  13. Contents:
  14.  
  15.  
  16.  
  17. * What's New in BoundsChecker 5.0 Standard Edition
  18.  
  19. * Reporting Problems And Suggestions
  20.  
  21. * Installation Prerequisites
  22.  
  23. * Installation
  24.  
  25. * If You Have A Previous Version Of BoundsChecker On Your System
  26.  
  27. * Removing An Installation
  28.  
  29. * Known Anomalies 
  30.  
  31. * Technical Notes
  32.  
  33. * Using BoundsChecker With Visual Test 4.0
  34.  
  35. * Using BoundsChecker With Symantec 7.0
  36.  
  37. * Using BoundsChecker With Watcom 10.5
  38.  
  39.  
  40.  
  41.  
  42.  
  43. What's New in BoundsChecker 5.0 Standard Edition
  44.  
  45. ------------------------------------------------
  46.  
  47.  
  48.  
  49. Improved user interface
  50.  
  51.  
  52.  
  53. BoundsChecker now displays both errors and events in the new Results 
  54.  
  55. window. The Results window is intended to help you focus on the most 
  56.  
  57. pertinent error information and easily change the information 
  58.  
  59. displayed. Also, you can now view program errors and events 
  60.  
  61. dynamically as your program runs.
  62.  
  63.  
  64.  
  65. The Settings dialog has been revised to better define default error 
  66.  
  67. detection settings and provide easier customization.   
  68.  
  69.  
  70.  
  71.  
  72.  
  73. Reporting Problems and Suggestions
  74.  
  75. ----------------------------------
  76.  
  77.  
  78.  
  79. Technical Support is available by e-mail at tech@numega.com or by 
  80.  
  81. calling Technical Support at 603-578-8100. You can also fax us at 603-
  82.  
  83. 578-8401 (attention: Technical Support).
  84.  
  85.  
  86.  
  87. Problem reports should include:
  88.  
  89.  
  90.  
  91. - System Configuration (CPU, RAM, OS, compiler, IDE)
  92.  
  93. - Detailed problem description (include exact error message text)
  94.  
  95. - How to reproduce problem
  96.  
  97. - Whether you are compiling from IDE or command line
  98.  
  99. - Options used in compiling and linking
  100.  
  101. - Your error detection mode (Normal, Maximum, or Custom)
  102.  
  103.  
  104.  
  105.  
  106.  
  107. Installation Prerequisites
  108.  
  109. --------------------------
  110.  
  111.  
  112.  
  113. * PC-compatible Intel 486 system or above
  114.  
  115. * Microsoft Windows NT 3.51 or 4.0
  116.  
  117. * Microsoft Windows 95
  118.  
  119. * RAM: 32 MB minimum
  120.  
  121. * Disk: 12 MB for full installation
  122.  
  123.  
  124.  
  125.  
  126.  
  127. Installation
  128.  
  129. ------------
  130.  
  131.  
  132.  
  133. To install BoundsChecker, insert the CD into your CD-ROM drive. Close 
  134.  
  135. any programs that may be running. With Windows 95 or Windows NT 4.0, use 
  136.  
  137. the Add/Remove Programs Control Panel. With Windows NT 3.51, use Program 
  138.  
  139. Manager or File Manager to run setup.exe.
  140.  
  141.  
  142.  
  143. The BoundsChecker installation directory needs to be in your path if you 
  144.  
  145. plan to compile and link from the DOS command-line.
  146.  
  147.  
  148.  
  149.  
  150.  
  151. If You Have A Previous Version Of BoundsChecker On Your System
  152.  
  153. --------------------------------------------------------------
  154.  
  155.  
  156.  
  157. BoundsChecker32/NT or BoundsChecker for Windows 95: BCHK32NT and/or 
  158.  
  159. BCHK32C must not appear in the path before the BoundsChecker directory. 
  160.  
  161. If they do, BoundsChecker may crash or fail to detect errors because it 
  162.  
  163. is trying to load obsolete libraries from the earlier product.
  164.  
  165.  
  166.  
  167. BoundsChecker 3.x: BoundsChecker 4.0 cannot be installed along with an 
  168.  
  169. installation of BoundsChecker 3.x (you will no longer be able to use 
  170.  
  171. your 3.x installation). If, after installing BoundsChecker 4.0, you need 
  172.  
  173. to use BoundsChecker 3.x, remove BoundsChecker 4.0 using the provided 
  174.  
  175. un-install utility, then re-install BoundsChecker 3.x.
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183. Removing An Installation
  184.  
  185. ------------------------
  186.  
  187.  
  188.  
  189. To remove this product, run the Remove BoundsChecker program item.
  190.  
  191.  
  192.  
  193. "Remove" performs these steps:
  194.  
  195.  
  196.  
  197. - Removes BoundsChecker registry entries
  198.  
  199. - Removes BoundsChecker-specific Visual C++ and Visual Test registry 
  200.  
  201. entries
  202.  
  203. - Deletes the BoundsChecker 4 program folder and items
  204.  
  205.  
  206.  
  207. NOTES:
  208.  
  209. - Files that were created after installation (such as Help system GID files) 
  210.  
  211. will not be removed automatically.
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219. Known Anomalies
  220.  
  221. ---------------
  222.  
  223.  
  224.  
  225. --- BoundsChecker inadvertently reports an access violation error in the 
  226.  
  227. Program Error Detected window if the application writes to its resource data. 
  228.  
  229. This error report typically occurs once for each page of virtual memory 
  230.  
  231. containing written resource data.
  232.  
  233.  
  234.  
  235. --- Due to a known problem in Windows95, it is possible to crash the 
  236.  
  237. operating system when halting a program from the BoundsChecker Program 
  238.  
  239. Error Detected window. Windows NT handles this situation properly, 
  240.  
  241. however, Windows95 does not. The problem occurs when an application 
  242.  
  243. calls ExitProcess (which BoundsChecker does to halt the application) and 
  244.  
  245. one of the DLLs used by the application brings up a message box during 
  246.  
  247. its DLL_PROCESS_DETACH processing sequence. To prevent this error 
  248.  
  249. condition, avoid making any calls to MessageBox during your 
  250.  
  251. DLL_PROCESS_DETACH processing.
  252.  
  253.  
  254.  
  255. --- Due to SmartHeap memory manager usage, it is possible, however 
  256.  
  257. unlikely, that BoundsChecker will report false overruns of dynamically 
  258.  
  259. allocated memory. In order to use BoundsChecker with the memory manager 
  260.  
  261. provided with SmartHeap/HeapAgent, you must add the following lines to 
  262.  
  263. the DEFAULT.DAT file, located in the BoundsChecker DATA directory (these 
  264.  
  265. are the functions that overload malloc, calloc, realloc and free):
  266.  
  267.               _MEM_malloc           ID  011
  268.  
  269.               _MEM_calloc           ID  015
  270.  
  271.               _MEM_free             ID  019
  272.  
  273.               _MEM_realloc          ID  022
  274.  
  275.  
  276.  
  277. Once you have edited DEFAULT.DAT, BoundsChecker will keep track of the 
  278.  
  279. heap correctly; both HeapAgent and BoundsChecker will be able to report 
  280.  
  281. errors to you. 
  282.  
  283.  
  284.  
  285. --- BoundsChecker reports leakage when processing DLL_PROCESS_DETACH. 
  286.  
  287. Since the order in which modules are unloaded cannot be controlled, 
  288.  
  289. erroneous leakage reports can result when a DLL unloads after 
  290.  
  291. BoundsChecker. This can occur when the following conditions are met:
  292.  
  293. - user DLL allocates memory in DLL_PROCESS_ATTACH
  294.  
  295. - user DLL frees the allocated memory in DLL_PROCESS_DETACH
  296.  
  297. - BoundsChecker unloads before the user DLL
  298.  
  299.  
  300.  
  301. --- In some rare instances, BoundsChecker may falsely report an 
  302.  
  303. incorrect number of arguments for sprintf functions for optimized code. 
  304.  
  305. Use Suppress to prevent a false report on later runs.
  306.  
  307.  
  308.  
  309. --- BoundsChecker may incorrectly report several memory and resource 
  310.  
  311. leaks from dynamically loaded Delphi 2.X DLLs, because these memory and 
  312.  
  313. resource allocations are implicitly freed. If you do not wish to be 
  314.  
  315. informed of these leaks, the recommended work around is to run 
  316.  
  317. BoundsChecker in Custom error detection mode, and make sure to disable 
  318.  
  319. the 'Report errors even if no source code is available' setting. This 
  320.  
  321. issue will be addressed in a future release.
  322.  
  323.  
  324.  
  325. --- Certain OLE interface methods, as implemented in some existing 
  326.  
  327. applications, will return the error code E_NOTIMPL ("not implemented"), 
  328.  
  329. although the OLE documentation indicates that this is not an acceptable 
  330.  
  331. return code for these methods.  This is the list of methods for which 
  332.  
  333. this sometimes occurs:
  334.  
  335.  
  336.  
  337.  IOleInPlaceObject::ContextSensitiveHelp
  338.  
  339.  IOleInPlaceObject::ReactivateAndUndo
  340.  
  341.  IOleObject::GetMoniker
  342.  
  343.  IViewObject2::Freeze
  344.  
  345.  
  346.  
  347. Note that BoundsChecker will notify you of this error even if you are 
  348.  
  349. running in Quick or Normal mode, or have unchecked the 'Check for OLE 
  350.  
  351. "not implemented" return code errors' option in Custom mode.  This is 
  352.  
  353. because we base our OLE error checking on documented OLE behavior.
  354.  
  355.  
  356.  
  357. --- OLE errors reported in OLE system DLLs:  In certain circumstances 
  358.  
  359. BoundsChecker can report errors on OLE interface method calls that are 
  360.  
  361. made inside system OLE DLLs such as OLE32.DLL and OLEAUT32.DLL.  These 
  362.  
  363. errors are only reported in normal and maximum mode and are always OLE 
  364.  
  365. return failure errors.  The reason these errors are reported is because 
  366.  
  367. an interface, that was created and hooked by BoundsChecker, was passed 
  368.  
  369. to an API function and that API is using it.  Since the interface was 
  370.  
  371. created in the user's program, we still monitor it for error detection 
  372.  
  373. even if it is inside a system DLL.
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383. Technical Notes
  384.  
  385. ---------------
  386.  
  387.  
  388.  
  389. --- Preventing Leaks in DLL Startup Code: BoundsChecker will detect 
  390.  
  391. leaks from the initialization code of a DLL that you cannot correct. To 
  392.  
  393. prevent these reports, name your DLL entry point DllMain. BoundsChecker 
  394.  
  395. recognizes DllMain, and knows not to check the startup code.
  396.  
  397.  
  398.  
  399.  
  400.  
  401. --- Debugging an NT service: Using the Registry Editor, go to 
  402.  
  403. HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS NT\CurrentVersion\. Create 
  404.  
  405. a new key called "Image File Execution Options". Under this key, create 
  406.  
  407. a subkey with the name of your service. For example, MYSERV.EXE. To this 
  408.  
  409. subkey, add a REG_SZ value called Debugger. For the Debugger value, 
  410.  
  411. enter the path to the BoundsChecker program (e.g., 
  412.  
  413. C:\BChecker\BC.EXE). Exit the Registry Editor. Start up the Control 
  414.  
  415. Panel, and double-click on the 'Services' icon. Highlight your service 
  416.  
  417. to be checked. Click the 'Startup...' button. In the dialog box that 
  418.  
  419. appears, select the 'Allow Service to Interact with Desktop' button. 
  420.  
  421. Click OK. If you don't do these steps, BoundsChecker will run, but will 
  422.  
  423. be invisible. At the main Control Panel | Services dialog, start your 
  424.  
  425. service. BoundsChecker should appear, with the service already opened. 
  426.  
  427. At this point, you can set any desired options and then run the service 
  428.  
  429. via BoundsChecker. If your service starts automatically during NT's 
  430.  
  431. bootup, use the Control Panel to set the 'Interact with desktop' 
  432.  
  433. attribute, and then restart the machine. BoundsChecker should start 
  434.  
  435. automatically when the service is started. (IMPORTANT NOTE: This only 
  436.  
  437. works with Windows NT 3.51, or later versions!)
  438.  
  439.  
  440.  
  441. --- Automatically invoking BoundsChecker when a program is executed 
  442.  
  443. (Windows NT only): You would use this if the program is invoked by some 
  444.  
  445. other process, and you want to run BoundsChecker on this program. NOTE: 
  446.  
  447. This works only on Windows NT, and will not work on Windows 95. As 
  448.  
  449. always, be careful whenever you edit the registry. Using REGEDT32:
  450.  
  451. 1 Select the key
  452.  
  453.   HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion
  454.  
  455. 2 Under the selected key, add the following KEY, if it does not exist:
  456.  
  457.   Image File Execution Options
  458.  
  459. 3 Under "Image File Execution Options" add this KEY:
  460.  
  461.   FOO.EXE
  462.  
  463.   (where FOO.EXE is the name of the program you want to test.)
  464.  
  465. 4 Under the "FOO.EXE" key add a new VALUE:
  466.  
  467.   Value name: Debugger
  468.  
  469.   Data type:  REG_SZ
  470.  
  471.   String:     c:\Bchecker\bc.exe
  472.  
  473.   (Where the string value is the full pathname for BoundsChecker on your 
  474.  
  475. machine.)
  476.  
  477.  
  478.  
  479. --- Startup performance and alternate DEFAULT.DAT files: If your program 
  480.  
  481. takes an unusually long time to start under BoundsChecker, you may want 
  482.  
  483. to use one of the alternate DEFAULT.DAT files shipped with 
  484.  
  485. BoundsChecker. First, backup your existing copy of DEFAULT.DAT by 
  486.  
  487. renaming DEFAULT.DAT (in the BoundsChecker DATA directory) to 
  488.  
  489. DEFAULT.BAK. Then, copy one of the alternate DEFAULT.xxx files to 
  490.  
  491. DEFAULT.DAT:
  492.  
  493. Microsoft C/C++ (includes Symantec)   DEFAULT.MSC
  494.  
  495. Borland C/C++ (include Watcom)        DEFAULT.BOR
  496.  
  497. Borland Object Pascal (Delphi 2.X)     DEFAULT.DPH
  498.  
  499. All of the above                      DEFAULT.ALL
  500.  
  501. NOTE: This is done automatically for you by the Setup program, based on 
  502.  
  503. your compiler choice.
  504.  
  505.  
  506.  
  507. IMPORTANT: If you need to change or add support for additional compilers 
  508.  
  509. after installing BoundsChecker, make sure to run Setup to install the 
  510.  
  511. appropriate DEFAULT.DAT file (or copy the appropriate file/files as 
  512.  
  513. described above).
  514.  
  515.  
  516.  
  517. --- Heap exceptions when running under a debugger in Windows NT 3.51: 
  518.  
  519. When an application is debugged, the Windows NT memory management APIs 
  520.  
  521. throw exceptions when bad parameters are detected. BoundsChecker uses 
  522.  
  523. some of these APIs to perform parameter validation, which can cause 
  524.  
  525. these exceptions to be thrown. At the request of many beta testers, we 
  526.  
  527. now disable the Windows NT debug heap during Smart Debugging. If you 
  528.  
  529. wish to re-enable the debug heap when using Smart Debugging, change the 
  530.  
  531. following registry value to 0.
  532.  
  533.  
  534.  
  535.     HKEY_CURRENT_USER
  536.  
  537.         \Software
  538.  
  539.             \Microsoft
  540.  
  541.                 \Developer
  542.  
  543.                     \BoundsChecker
  544.  
  545.                         \DisableHeapException
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555. Using BoundsChecker With Visual Test 4.0
  556.  
  557. ----------------------------------------
  558.  
  559.  
  560.  
  561. When using the BoundsChecker with Visual Test, make sure that your 
  562.  
  563. scripts wait for BoundsChecker to completely finish so all text is 
  564.  
  565. properly sent to your BoundsCheckerNotification handler.  If the script 
  566.  
  567. ends before BoundsChecker is finished, some error notifications might 
  568.  
  569. not get through.  This is especially true with memory and resource leaks 
  570.  
  571. since the application being tested must completely end before they can 
  572.  
  573. be reported.
  574.  
  575.  
  576.  
  577. Here are two methods to make sure your script does not end prematurely:
  578.  
  579.  
  580.  
  581. 1 In the test script, following the commands to close the application 
  582.  
  583. being tested, add a long enough sleep statement to allow BoundsChecker 
  584.  
  585. to get all the information over to the notification handler (You may 
  586.  
  587. need to use a value greater than the 60 used here).
  588.  
  589. ...
  590.  
  591. WSysMenu ( 0 )
  592.  
  593. WMenuSelect ( "&Close" )
  594.  
  595. Sleep ( 60 )
  596.  
  597. End
  598.  
  599. ...
  600.  
  601.  
  602.  
  603. 2 If the script is run interactively, a Pause statement will display a 
  604.  
  605. message box and wait until the OK button is pressed before the script 
  606.  
  607. will continue.
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617. Using BoundsChecker With Symantec 7.0
  618.  
  619. -------------------------------------
  620.  
  621.  
  622.  
  623. The Symantec C\C++ compiler uses the Microsoft CodeView debug format, so 
  624.  
  625. no special steps need to be taken during compile and link except to 
  626.  
  627. include debug information. This can be accomplished by compiling and 
  628.  
  629. linking with the following switches:
  630.  
  631.  
  632.  
  633. Compile: -g
  634.  
  635. Link: /CO
  636.  
  637.  
  638.  
  639. As with any debugger, BoundsChecker works best if optimizations are 
  640.  
  641. disabled, which can be done by compiling with the -od compiler switch.
  642.  
  643.  
  644.  
  645. The Symantec C\C++ compiler also uses the MFC class library. This is the 
  646.  
  647. same MFC as is shipped with the Microsoft Visual C++ compiler. 
  648.  
  649. BoundsChecker works the same with both the Microsoft and the Symantec 
  650.  
  651. compilers.
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661. Using BoundsChecker With Watcom 10.5
  662.  
  663. ------------------------------------
  664.  
  665.  
  666.  
  667. The Watcom 10.5 compiler is capable of producing CodeView compatible 
  668.  
  669. debug information and thus is compatible with BoundsChecker.  
  670.  
  671. BoundsChecker will not run correctly with versions of Watcom prior to 
  672.  
  673. 10.5. To prepare your Watcom program for use with BoundsChecker:
  674.  
  675.  
  676.  
  677. 1 Compile with the following switches:
  678.  
  679. -hc - Set output debug format - CodeView.
  680.  
  681. -d3 - Full symbolic debugging with unreferenced type names.
  682.  
  683. -od - disable optimizations
  684.  
  685. -3s or -4s or -5s - add stack calling conventions
  686.  
  687.  
  688.  
  689. 2 Link
  690.  
  691. Include the line:  DEBUG CODEVIEW
  692.  
  693.  
  694.  
  695. 3 CVPACK the executable
  696.  
  697. After building the .EXE file, run CVPACK, found in the Watcom BINNT 
  698.  
  699. directory, on the .EXE.
  700.  
  701.  
  702.  
  703.  
  704.  
  705. -----------------------------------------------------------------
  706.  
  707. Copyright 1997 NuMega Technologies, Inc.
  708.  
  709. 03/03/97
  710.  
  711.  
  712.  
  713.  
  714.